From 23e5963203e71863de48af94cbea9cdf25d62aa2 Mon Sep 17 00:00:00 2001 From: Alex Z Date: Sat, 26 Dec 2009 21:56:05 +0000 Subject: [PATCH] Per CR on r58079, add a permission check for 'reupload-shared' to Title::isValidMoveOperation when moving a file over one on a shared repo --- includes/Title.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index 4efd6d1ed4..89b01f4230 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2686,7 +2686,10 @@ class Title { if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) { $errors[] = array('imagetypemismatch'); } + } elseif( !$wgUser->isAllowed( 'reupload-shared' ) && wfFindFile( $nt ) ) { + $errors[] = array( 'file-exists-sharedrepo' ); } + } if ( $auth ) { -- 2.20.1